package com.yeswater.multithread.chapter2.test2_1.test7;

import org.junit.Test;

/**
 * author : yeswater
 * date : 2023/10/19
 */

public class RunTest {

    /**
     * synchronized 是可重入锁 在 synchronized 内部调用本类其他 synchronized 方法时永远可以得到锁
     */
    @Test
    public void test() {
        Thread thread = new Thread(() -> {
            Service service = new Service();
            service.service1();
        });
        thread.start();
    }

}
